#!/bin/bash 
#echo HelloWorld
##cd ..
##ls
#export testname='sunxiaochuan'
#
#test() 
#{
#    local testname='baichen';
#    echo $testname
#}
#
#test
#echo $testname
#./child.sh

#if [ -f '/bin/bash' ]
#then
#    echo 'bash is common file'
#elif [ -d '/bin/bash' ]; then 
#    echo 'bash is directory file'
#else
#    echo 'bash is not recognized'
#fi
#
#if :; then echo 'always true'; fi
#
#if $(/bin/true); then echo 'always true'; fi 
#
#if `/bin/false`; then :; 
#else echo 'always false'
#fi

#echo 'Is it morning?'
#read INPUT
#
#if [ "$INPUT" = 'YES' ]
#then
#    echo 'Good morning'
#elif [ "$INPUT" = 'NO' ] 
#then
#    echo 'Good afternoon'
#else
#    echo 'not recognized'
#fi 
#
## &&和||可以用在两个不同的命令之间，而-a和-o只能用在test命令的参数中
#
#test "$INPUT" = 'baichen' && echo 'im baichen'
#test "$INPUT" = 'baichen' || echo 'im not baichen'

#case "$INPUT" in 
#yes|YES|Yes)
#    echo 'Good morning'
#    ;;
#[Nn][Oo])
#    echo 'Good afternoon'
#    ;;
#*)
#    echo "Don't recognized"
#    ;;
#esac

#for e in apple banana pear
#do 
#    echo "$e"
#done
#
#for file in `ls a*.c`; do 
#    mv "$file" "$file"c
#done

#RES=0
#
#for i in {1..100} ; do 
#    RES=$[$RES+$i]
#done
#
#echo $RES
#
#for file in `ls`
#do 
#    echo "$file"
#done
#
#CNT=0
#RES=0
#while [ $CNT -le 100 ]; do 
#    RES=$[$RES+$CNT]
#    CNT=$[$CNT+1]
#    if [ $CNT -le 100 ]; then 
#        #break;
#        continue
#    fi 
#done

#echo $RES
#echo 'Enter your password:'
#read PASSWD
#while [ "$PASSWD" != 'baichen' ]; do 
#    echo 'password error, please reenter:'
#    read PASSWD
#done
#

#echo 'Enter your password:'
#read PASSWD
#until [ "$PASSWD" = 'baichen' ]; do 
#    echo 'password error, please reenter:'
#    read PASSWD
#done

#echo $0 $1 $2 $3 
#echo $@
#echo $#
#echo $$
#
#shift 2
#echo $0 $1 $2 $3 
#echo $@
#echo $#
#echo $$

#for i in $@; do 
#    echo $i
#done


function foo() 
{
    echo "foo"
}

foo

if
